#import pandans
# opengl init
# from OpenGL.GL import *
# from OpenGL.GLU import *
# from OpenGL.GLUT import *
import obj
import pyglet
def Draw():
    glClearColor(0,0,0,1)
    pass
def init():
    window=pyglet.window.Window(resizable=True)
    label = pyglet.text.Label('obj viewer',font_name='Times New Roman',font_size=36,x=window.width // 2, y=window.height // 2,anchor_x='center', anchor_y='center')
    @window.event
    def on_draw():
        #glClear(GL_COLOR_BUFFER_BIT)
        window.clear()
        label.draw()
        pyglet.graphics.draw_indexed(4, pyglet.gl.GL_TRIANGLES,[0, 1, 2, 0, 2, 3],
            ('v2i', (100, 100,
             150, 100,
             150, 150,
             100, 150))
)
       
    # obj.load()
    print(obj.vertex_array)
    print(obj.index_order_array)
    print(obj.vn_points_array)
    pyglet.options['audio']=('openal', 'pulse', 'directsound', 'silent')
    # sound=pyglet.media.load("jump.wav")
    # sound.play()
init()
pyglet.app.run()